Logical sector mapping in a flash storage array

ABSTRACT

A system and method for efficiently performing user storage virtualization for data stored in a storage system including a plurality of solid-state storage devices. A data storage subsystem supports multiple mapping tables. Records within a mapping table are arranged in multiple levels. Each level stores pairs of a key value and a pointer value. The levels are sorted by time. New records are inserted in a created newest (youngest) level. No edits are performed in-place. All levels other than the youngest may be read only. The system may further include an overlay table which identifies those keys within the mapping table that are invalid.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.14/160,137, entitled “Logical Sector Mapping In A Flash Storage Array”,filed Jan. 21, 2014, which is a continuation of U.S. patent applicationSer. No. 13/289,765, entitled “Logical Sector Mapping In A Flash StorageArray”, filed Nov. 4, 2011, now U.S. Pat. No. 8,645,664, which is acontinuation of U.S. patent application Ser. No. 13/208,094, entitled“Logical Sector Mapping In A Flash Storage Array”, filed Aug. 11, 2011,now U.S. Pat. No. 8,788,788, the entirety of each being incorporatedherein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to computer networks and, more particularly, toefficiently performing user storage virtualization for data stored amonga plurality of solid-state storage devices.

2. Description of the Related Art

As computer memory storage and data bandwidth increase, so does theamount and complexity of data that businesses daily manage. Large-scaledistributed storage systems, such as data centers, typically run manybusiness operations. A datacenter, which also may be referred to as aserver room, is a centralized repository, either physical or virtual,for the storage, management, and dissemination of data pertaining to oneor more businesses. A distributed storage system may be coupled toclient computers interconnected by one or more networks. If any portionof the distributed storage system has poor performance, companyoperations may be impaired. A distributed storage system thereforemaintains high standards for data availability and high-performancefunctionality.

The distributed storage system comprises physical volumes, which may behard disks, solid-state devices, storage devices using another storagetechnology, or partitions of a storage device. Software applications,such as a logical volume manager or a disk array manager, provide ameans of allocating space on mass-storage arrays. In addition, thissoftware allows a system administrator to create units of storage groupsincluding logical volumes. Storage virtualization provides anabstraction (separation) of logical storage from physical storage inorder to access logical storage without end-users identifying physicalstorage.

To support storage virtualization, a volume manager performsinput/output (I/O) redirection by translating incoming I/O requestsusing logical addresses from end-users into new requests using addressesassociated with physical locations in the storage devices. As somestorage devices may include additional address translation mechanisms,such as address translation layers which may be used in solid statestorage devices, the translation from a logical address to anotheraddress mentioned above may not represent the only or final addresstranslation. Redirection utilizes metadata stored in one or more mappingtables. In addition, information stored in one or more mapping tablesmay be used for storage deduplication and mapping virtual sectors at aspecific snapshot level to physical locations. The volume manager maymaintain a consistent view of mapping information for the virtualizedstorage. However, a supported address space may be limited by a storagecapacity used to maintain a mapping table.

The technology and mechanisms associated with chosen storage disksdetermines the methods used by a volume manager. For example, a volumemanager that provides mappings for a granularity level of a hard disk, ahard disk partition, or a logical unit number (LUN) of an externalstorage device is limited to redirecting, locating, removing duplicatedata, and so forth, for large chunks of data. One example of anothertype of storage disk is a Solid-State Disk (SSD). An SSD may emulate aHDD interface, but an SSD utilizes solid-state memory to storepersistent data rather than electromechanical devices as found in a HDD.For example, an SSD may comprise banks of Flash memory. Accordingly, alarge supported address space by one or more mapping tables may not beachieved in systems comprising SSDs for storage while utilizing mappingtable allocation algorithms developed for HDDs.

In view of the above, systems and methods for efficiently performingstorage virtualization for data stored among a plurality of solid-statestorage devices are desired.

SUMMARY OF THE INVENTION

Various embodiments of a computer system and methods for efficientlyperforming user storage virtualization for data stored among a pluralityof solid-state storage devices are disclosed.

In one embodiment, a data storage subsystem coupled to a networkreceives read and write requests on the network from a client computer.The data storage subsystem comprises a plurality of data storagelocations on a device group including a plurality of storage devices.The data storage subsystem further comprises at least one mapping tablecomprising a plurality of levels sorted by time. In one embodiment, eachlevel stores one or more tuples, each of the tuples including one ormore values that may be used as lookup keys. In addition, each of thetuples may include data values that are associated with the key values.In one embodiment, the mapping table is a virtual-to-physical addresstranslation table. In another embodiment, the mapping table is adeduplication table. The data storage subsystem further comprises a datastorage controller configured to create a new highest level (youngestlevel) to be added to the plurality of levels in response to detecting acondition for inserting one or more new tuples into the mapping table.Each tuple may be stored in a separate record, or entry, within themapping table. The records may be sorted by key value.

Also contemplated are embodiments in which the system includes one ormore “overlay” tables. An overlay table may be used to modify responsesto queries answered by the mapped table. Modified responses can includemarking responses invalid or modifiying field values in tuples providedin response to a query to the mapping table. Accesses to the overlaytable may determine in a relatively quick manner that a given key is notvalid. Also contemplated are embodiments wherein all levels of themapping table, other than the youngest, are read only.

These and other embodiments will become apparent upon consideration ofthe following description and accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a generalized block diagram illustrating one embodiment ofnetwork architecture.

FIG. 2 is a generalized block diagram of one embodiment of a mappingtable.

FIG. 3A is a generalized block diagram of one embodiment of a primaryindex used to access a mapping table.

FIG. 3B is a generalized block diagram of another embodiment of aprimary index used to access a mapping table.

FIG. 4 is a generalized block diagram of another embodiment of a primaryindex and mapping table.

FIG. 5A is a generalized flow diagram illustrating one embodiment of amethod for performing a read access.

FIG. 5B is a generalized flow diagram illustrating one embodiment of amethod for performing a write operation.

FIG. 6 is a generalized block diagram of one embodiment of a multi-nodenetwork with shared mapping tables.

FIG. 7 is a generalized block diagram of one embodiment of a secondaryindex used to access a mapping table.

FIG. 8 is a generalized block diagram of one embodiment of a tertiaryindex accessing a mapping table.

FIG. 9 illustrates one embodiment of a method that utilizes overlaytables.

FIG. 10 is a generalized block diagram of one embodiment of a flatteningoperation for levels within a mapping table.

FIG. 11 is a generalized block diagram of another embodiment of aflattening operation for levels within a mapping table.

FIG. 12 is a generalized flow diagram illustrating one embodiment of amethod for flattening levels within a mapping table.

FIG. 13 is a generalized flow diagram illustrating one embodiment of amethod for efficiently processing bulk array tasks within a mappingtable.

FIG. 14 is a generalized block diagram illustrating an embodiment of adata layout architecture within a storage device.

While the invention is susceptible to various modifications andalternative forms, specific embodiments are shown by way of example inthe drawings and are herein described in detail. It should beunderstood, however, that drawings and detailed description thereto arenot intended to limit the invention to the particular form disclosed,but on the contrary, the invention is to cover all modifications,equivalents and alternatives falling within the spirit and scope of thepresent invention as defined by the appended claims.

DETAILED DESCRIPTION

In the following description, numerous specific details are set forth toprovide a thorough understanding of the present invention. However, onehaving ordinary skill in the art should recognize that the inventionmight be practiced without these specific details. In some instances,well-known circuits, structures, signals, computer program instruction,and techniques have not been shown in detail to avoid obscuring thepresent invention.

Referring to FIG. 1, a generalized block diagram of one embodiment of anetwork architecture 100 is shown. As described further below, oneembodiment of network architecture 100 includes client computer systems110 a-110 b interconnected to one another through a network 180 and todata storage arrays 120 a-120 b. Network 180 may be coupled to a secondnetwork 190 through a switch 140. Client computer system 110 c iscoupled to client computer systems 110 a-110 b and data storage arrays120 a-120 b via network 190. In addition, network 190 may be coupled tothe Internet 160 or otherwise outside network through switch 150.

It is noted that in alternative embodiments, the number and type ofclient computers and servers, switches, networks, data storage arrays,and data storage devices is not limited to those shown in FIG. 1. Atvarious times one or more clients may operate offline. In addition,during operation, individual client computer connection types may changeas users connect, disconnect, and reconnect to network architecture 100.Further, while the present description generally discusses networkattached storage, the systems and methods described herein may also beapplied to directly attached storage systems and may include a hostoperating system configured to perform one or more aspects of thedescribed methods. Numerous such alternatives are possible and arecontemplated. A further description of each of the components shown inFIG. 1 is provided shortly. First, an overview of some of the featuresprovided by the data storage arrays 120 a-120 b is described.

In the network architecture 100, each of the data storage arrays 120a-120 b may be used for the sharing of data among different servers andcomputers, such as client computer systems 110 a-110 c. In addition, thedata storage arrays 120 a-120 b may be used for disk mirroring, backupand restore, archival and retrieval of archived data, and data migrationfrom one storage device to another. In an alternate embodiment, one ormore client computer systems 110 a-110 c may be linked to one anotherthrough fast local area networks (LANs) in order to form a cluster. Suchclients may share a storage resource, such as a cluster shared volumeresiding within one of data storage arrays 120 a-120 b.

Each of the data storage arrays 120 a-120 b includes a storage subsystem170 for data storage. Storage subsystem 170 may comprise a plurality ofstorage devices 176 a-176 m. These storage devices 176 a-176 m mayprovide data storage services to client computer systems 110 a-110 c.Each of the storage devices 176 a-176 m uses a particular technology andmechanism for performing data storage. The type of technology andmechanism used within each of the storage devices 176 a-176 m may atleast in part be used to determine the algorithms used for controllingand scheduling read and write operations to and from each of the storagedevices 176 a-176 m. For example, the algorithms may locate particularphysical locations corresponding to the operations. In addition, thealgorithms may perform input/output (I/O) redirection for theoperations, removal of duplicate data in the storage subsystem 170, andsupport one or more mapping tables used for address redirection anddeduplication.

The logic used in the above algorithms may be included in one or more ofa base operating system (OS) 132, a volume manager 134, within a storagesubsystem controller 174, control logic within each of the storagedevices 176 a-176 m, or otherwise. Additionally, the logic, algorithms,and control mechanisms described herein may comprise hardware and/orsoftware.

Each of the storage devices 176 a-176 m may be configured to receiveread and write requests and comprise a plurality of data storagelocations, each data storage location being addressable as rows andcolumns in an array. In one embodiment, the data storage locationswithin the storage devices 176 a-176 m may be arranged into logical,redundant storage containers or RAID arrays (redundant arrays ofinexpensive/independent disks).

In some embodiments, each of the storage devices 176 a-176 m may utilizetechnology for data storage that is different from a conventional harddisk drive (HDD). For example, one or more of the storage devices 176a-176 m may include or be further coupled to storage consisting ofsolid-state memory to store persistent data. In other embodiments, oneor more of the storage devices 176 a-176 m may include or be furthercoupled to storage using other technologies such as spin torque transfertechnique, magnetoresistive random access memory (MRAM) technique,shingled disks, memristors, phase change memory, or other storagetechnologies. These different storage techniques and technologies maylead to differing I/O characteristics between storage devices.

In one embodiment, the included solid-state memory comprises solid-statedrive (SSD) technology. The differences in technology and mechanismsbetween HDD technology and SDD technology may lead to differences ininput/output (I/O) characteristics of the data storage devices 176 a-176m. A Solid-State Disk (SSD) may also be referred to as a Solid-StateDrive. Without moving parts or mechanical delays, an SSD may have alower read access time and latency than a HDD. However, the writeperformance of SSDs is generally slower than the read performance andmay be significantly impacted by the availability of free, programmableblocks within the SSD.

Storage array efficiency may be improved by creating a storagevirtualization layer between user storage and physical locations withinstorage devices 176 a-176 m. In one embodiment, a virtual layer of avolume manager is placed in a device-driver stack of an operating system(OS), rather than within storage devices or in a network. Many storagearrays perform storage virtualization at a coarse-grained level to allowstoring of virtual-to-physical mapping tables entirely in memory.However, such storage arrays are unable to integrate features such asdata compression, deduplication and copy-on-modify operations. Many filesystems support fine-grained virtual-to-physical mapping tables, butthey do not support large storage arrays, such as device groups 173a-173 m. Rather, a volume manager or a disk array manager is used tosupport device groups 173 a-173 m.

In one embodiment, one or more mapping tables may be stored in thestorage devices 176 a-176 m, rather than memory, such as RAM 172, memorymedium 130 or a cache within processor 122. The storage devices 176a-176 may be SSDs utilizing Flash memory. The low read access andlatency times for SSDs may allow a small number of dependent readoperations to occur while servicing a storage access request from aclient computer. The dependent read operations may be used to access oneor more indexes, one or more mapping tables, and user data during theservicing of the storage access request.

In one example, I/O redirection may be performed by the dependent readoperations. In another example, inline deduplication may be performed bythe dependent read operations. In yet another example, bulk array tasks,such as a large copy, move, or zeroing operation, may be performedentirely within a mapping table rather than accessing storage locationsholding user data. Such a direct map manipulation may greatly reduce I/Otraffic and data movement within the storage devices 176 a-176 m. Thecombined time for both servicing the storage access request andperforming the dependent read operations from SSDs may be less thanservicing a storage access request from a spinning HDD.

In addition, the information within a mapping table may be compressed. Aparticular compression algorithm may be chosen to allow identificationof individual components, such as a key within a record among multiplerecords. Therefore, a search for a given key among multiple compressedrecords may occur. If a match is found, only the matching record may bedecompressed. Compressing the tuples within records of a mapping tablemay further enable fine-grained level mapping. This fine-grained levelmapping may allow direct map manipulation as an alternative to commonbulk array tasks. Further details concerning efficient storagevirtualization will be discussed below.

Again, as shown, network architecture 100 includes client computersystems 110 a-110 c interconnected through networks 180 and 190 to oneanother and to data storage arrays 120 a-120 b. Networks 180 and 190 mayinclude a variety of techniques including wireless connection, directlocal area network (LAN) connections, wide area network (WAN)connections such as the Internet, a router, storage area network,Ethernet, and others. Networks 180 and 190 may comprise one or more LANsthat may also be wireless. Networks 180 and 190 may further includeremote direct memory access (RDMA) hardware and/or software,transmission control protocol/internet protocol (TCP/IP) hardware and/orsoftware, router, repeaters, switches, grids, and/or others. Protocolssuch as Fibre Channel, Fibre Channel over Ethernet (FCoE), iSCSI, and soforth may be used in networks 180 and 190. Switch 140 may utilize aprotocol associated with both networks 180 and 190. The network 190 mayinterface with a set of communications protocols used for the Internet160 such as the Transmission Control Protocol (TCP) and the InternetProtocol (IP), or TCP/IP. Switch 150 may be a TCP/IP switch.

Client computer systems 110 a-110 c are representative of any number ofstationary or mobile computers such as desktop personal computers (PCs),servers, server farms, workstations, laptops, handheld computers,servers, personal digital assistants (PDAs), smart phones, and so forth.Generally speaking, client computer systems 110 a-110 c include one ormore processors comprising one or more processor cores. Each processorcore includes circuitry for executing instructions according to apredefined general-purpose instruction set. For example, the x86instruction set architecture may be selected. Alternatively, the Alpha®,PowerPC®, SPARC®, or any other general-purpose instruction setarchitecture may be selected. The processor cores may access cachememory subsystems for data and computer program instructions. The cachesubsystems may be coupled to a memory hierarchy comprising random accessmemory (RAM) and a storage device.

Each processor core and memory hierarchy within a client computer systemmay be connected to a network interface. In addition to hardwarecomponents, each of the client computer systems 110 a-110 c may includea base operating system (OS) stored within the memory hierarchy. Thebase OS may be representative of any of a variety of operating systems,such as, for example, MS-DOS®, MS-WINDOWS®, OS/2®, UNIX®, Linux®,Solaris®, AIX®, DART, or otherwise. As such, the base OS may be operableto provide various services to the end-user and provide a softwareframework operable to support the execution of various programs.Additionally, each of the client computer systems 110 a-110 c mayinclude a hypervisor used to support virtual machines (VMs). As is wellknown to those skilled in the art, virtualization may be used indesktops and servers to fully or partially decouple software, such as anOS, from a system's hardware. Virtualization may provide an end-userwith an illusion of multiple OSes running on a same machine each havingits own resources and access to logical storage entities (e.g., LUNs)built upon the storage devices 176 a-176 m within each of the datastorage arrays 120 a-120 b.

Each of the data storage arrays 120 a-120 b may be used for the sharingof data among different servers, such as the client computer systems 110a-110 c. Each of the data storage arrays 120 a-120 b includes a storagesubsystem 170 for data storage. Storage subsystem 170 may comprise aplurality of storage devices 176 a-176 m. Each of these storage devices176 a-176 m may be an SSD. A controller 174 may comprise logic forhandling received read/write requests. A random-access memory (RAM) 172may be used to batch operations, such as received write requests. Invarious embodiments, when batching write operations (or otheroperations) non-volatile storage (e.g., NVRAM) may be used.

The base OS 132, the volume manager 134 (or disk array manager 134), anyOS drivers (not shown) and other software stored in memory medium 130may provide functionality providing access to files and the managementof these functionalities. The base OS 132 may be a storage operatingsystem such as NetApp Data ONTAP® or otherwise. The base OS 132 and theOS drivers may comprise program instructions stored on the memory medium130 and executable by processor 122 to perform one or more memory accessoperations in storage subsystem 170 that correspond to receivedrequests. The system shown in FIG. 1 may generally include one or morefile servers and/or block servers.

Each of the data storage arrays 120 a-120 b may use a network interface124 to connect to network 180. Similar to client computer systems 110a-110 c, in one embodiment, the functionality of network interface 124may be included on a network adapter card. The functionality of networkinterface 124 may be implemented using both hardware and software. Botha random-access memory (RAM) and a read-only memory (ROM) may beincluded on a network card implementation of network interface 124. Oneor more application specific integrated circuits (ASICs) may be used toprovide the functionality of network interface 124.

In addition to the above, each of the storage controllers 174 within thedata storage arrays 120 a-120 b may support storage array functions suchas snapshots, replication and high availability. In addition, each ofthe storage controllers 174 may support a virtual machine environmentthat comprises a plurality of volumes with each volume including aplurality of snapshots. In one example, a storage controller 174 maysupport hundreds of thousands of volumes, wherein each volume includesthousands of snapshots. In one embodiment, a volume may be mapped infixed-size sectors, such as a 4-kilobyte (KB) page within storagedevices 176 a-176 m. In another embodiment, a volume may be mapped invariable-size sectors such as for write requests. A volume ID, asnapshot ID, and a sector number may be used to identify a given volume.

An address translation table may comprise a plurality of entries,wherein each entry holds a virtual-to-physical mapping for acorresponding data component. This mapping table may be used to maplogical read/write requests from each of the client computer systems 110a-110 c to physical locations in storage devices 176 a-176 m. A“physical” pointer value may be read from the mapping table during alookup operation corresponding to a received read/write request. Thisphysical pointer value may then be used to locate a physical locationwithin the storage devices 176 a-176 m. It is noted the physical pointervalue may be used to access another mapping table within a given storagedevice of the storage devices 176 a-176 m. Consequently, one or morelevels of indirection may exist between the physical pointer value and atarget storage location.

In another embodiment, the mapping table may comprise information usedto deduplicate data (deduplication table related information). Theinformation stored in the deduplication table may include mappingsbetween one or more calculated hash values for a given data componentand a physical pointer to a physical location in one of the storagedevices 176 a-176 m holding the given data component. In addition, alength of the given data component and status information for acorresponding entry may be stored in the deduplication table.

Turning now to FIG. 2, a generalized block diagram of one embodiment ofa mapping table is shown. As discussed earlier, one or more mappingtables may be used for I/O redirection or translation, deduplication ofduplicate copies of user data, volume snapshot mappings, and so forth.Mapping tables may be stored in the storage devices 176 a-176 m. Thediagram shown in FIG. 2 represents a logical representation of oneembodiment of the organization and storage of the mapping table. Eachlevel shown may include mapping table entries corresponding to adifferent period of time. For example, level “1” may include informationolder than information stored in level “2”. Similarly, level “2” mayinclude information older than information stored in level “3”. Theinformation stored in the records, pages and levels shown in FIG. 2 maybe stored in a random-access manner within the storage devices 176 a-176m. Additionally, copies of portions or all of a given mapping tableentries may be stored in RAM 172, in buffers within controller 174, inmemory medium 130, and in one or more caches within or coupled toprocessor 122. In various embodiments, a corresponding index may beincluded in each level for mappings which are part of the level (asdepicted later in FIG. 4). Such an index may include an identificationof mapping table entries and where they are stored (e.g., anidentification of the page) within the level. In other embodiments, theindex associated with mapping table entries may be a distinct entity, orentities, which are not logically part of the levels themselves.

Generally speaking, each mapping table comprises a set of rows andcolumns. A single record may be stored in a mapping table as a row. Arecord may also be referred to as an entry. In one embodiment, a recordstores at least one tuple including a key. Tuples may (or may not) alsoinclude data fields including data such as a pointer used to identify orlocate data components stored in storage subsystem 170. It is noted thatin various embodiments, the storage subsystem may include storagedevices (e.g., SSDs) which have internal mapping mechanisms. In suchembodiments, the pointer in the tuple may not be an actual physicaladdress per se. Rather, the pointer may be a logical address which thestorage device maps to a physical location within the device. Over time,this internal mapping between logical address and physical location maychange. In other embodiments, records in the mapping table may onlycontain key fields with no additional associated data fields. Attributesassociated with a data component corresponding to a given record may bestored in columns, or fields, in the table. Status information, such asa valid indicator, a data age, a data size, and so forth, may be storedin fields, such as Field0 to FieldN shown in FIG. 2. In variousembodiments, each column stores information corresponding to a giventype. In some embodiments, compression techniques may be utilized forselected fields which in some cases may result in fields whosecompressed representation is zero bits in length.

A key is an entity in a mapping table that may distinguish one row ofdata from another row. Each row may also be referred to as an entry or arecord. A key may be a single column, or it may consist of a group ofcolumns used to identify a record. In one example, an addresstranslation mapping table may utilize a key comprising a volumeidentifier (ID), a logical or virtual address, a snapshot ID, a sectornumber, and so forth. A given received read/write storage access requestmay identify a particular volume, sector and length. A sector may be alogical block of data stored in a volume. Sectors may have differentsizes on different volumes. The address translation mapping table maymap a volume in sector-size units.

A volume identifier (ID) may be used to access a volume table thatconveys a volume ID and a corresponding current snapshot ID. Thisinformation along with the received sector number may be used to accessthe address translation mapping table. Therefore, in such an embodiment,the key value for accessing the address translation mapping table is thecombination of the volume ID, snapshot ID, and the received sectornumber. In one embodiment, the records within the address translationmapping table are sorted by volume ID, followed by the sector number andthen by the snapshot ID. This ordering may group together differentversions of data components in different snapshots. Therefore, during alookup for a storage access read request, a corresponding data componentmay be found with fewer read operations to the storage devices 176 a-176m.

The address translation mapping table may convey a physical pointervalue that indicates a location within the data storage subsystem 170storing a data component corresponding to the received data storageaccess request. The key value may be compared to one or more key valuesstored in the mapping table. In the illustrated example, simpler keyvalues, such as “0”, “2”, “12” and so forth, are shown for ease ofillustration. The physical pointer value may be stored in one or more ofthe fields in a corresponding record.

The physical pointer value may include a segment identifier (ID) and aphysical address identifying the location of storage. A segment may be abasic unit of allocation in each of the storage devices 176 a-176 m. Asegment may have a redundant array of independent device (RAID) leveland a data type. During allocation, a segment may have one or more ofthe storage devices 176 a-176 m selected for corresponding storage. Inone embodiment, a segment may be allocated an equal amount of storagespace on each of the one or more selected storage devices of the storagedevices 176 a-176 m. The data storage access request may correspond tomultiple sectors, which may result in multiple parallel lookups. A writerequest may be placed in an NVRAM buffer, such as RAM 172, and a writecompletion acknowledgment may be sent to a corresponding client computerof the client computers 110 a-110 c. At a later time, an asynchronousprocess may flush the buffered write requests to the storage devices 176a-176 m.

In another example, the mapping table shown in FIG. 2 may be adeduplication table. A deduplication table may utilize a key comprisinga hash value determined from a data component associated with a storageaccess request. The initial steps of a deduplication operation may beperformed concurrently with other operations, such as a read/writerequest, a garbage collection operation, a trim operation, and so forth.For a given write request, the data sent from one of the client computersystems 110 a-110 c may be a data stream, such as a byte stream. As iswell known to those skilled in the art, a data stream may be dividedinto a sequence of fixed-length or variable-length chunks. A chunkingalgorithm may perform the dividing of the data stream into discrete datacomponents which may be referred to as “chunks”. A chunk may be asub-file content-addressable unit of data. In various embodiments, atable or other structure may be used to determine a particular chunkingalgorithm to use for a given file type or type of data. A file's typemay be determined by referring to its file name extension, separateidentifying information, the content of the data itself, or otherwise.The resulting chunks may then be stored in one of the data storagearrays 120 a-120 b to allow for sharing of the chunks. Such chunks maybe stored separately or grouped together in various ways.

In various embodiments, the chunks may be represented by a datastructure that allows reconstruction of a larger data component from itschunks (e.g. a particular file may be reconstructed based on one or moresmaller chunks of stored data). A corresponding data structure mayrecord its corresponding chunks including an associated calculated hashvalue, a pointer (physical and/or logical) to its location in one of thedata storage arrays 120 a-120 b, and its length. For each datacomponent, a deduplication application may be used to calculate acorresponding hash value. For example, a hash function, such asMessage-Digest algorithm 5 (MD5), Secure Hash Algorithm (SHA), orotherwise, may be used to calculate a corresponding hash value. In orderto know if a given data component corresponding to a received writerequest is already stored in one of the data storage arrays 120 a-120 b,bits of the calculated hash value (or a subset of bits of the hashvalue) for the given data component may be compared to bits in the hashvalues of data components stored in one or more of the data storagearrays 120 a-120 b.

A mapping table may comprise one or more levels as shown in FIG. 2. Amapping table may comprise 16 to 64 levels, although another number oflevels supported within a mapping table is possible and contemplated. InFIG. 2, three levels labeled Level “1”, Level “2” and Level “N” areshown for ease of illustration. Each level within a mapping table mayinclude one or more partitions. In one embodiment, each partition is a 4kilo-byte (KB) page. For example, Level “N” is shown to comprise pages210 a-210 g, Level “2” comprises pages 210 h-210 j and Level “1”comprises pages 210 k-210 n. It is possible and contemplated otherpartition sizes may also be chosen for each of the levels within amapping table. In addition, it is possible one or more levels have asingle partition, which is the level itself.

In one embodiment, multiple levels within a mapping table are sorted bytime. For example, in FIG. 2, Level “1” may be older than Level “2”.Similarly, Level “2” may be older than Level “N”. In one embodiment,when a condition for inserting one or more new records in the mappingtable is detected, a new level may be created. In various embodiments,when a new level is created the number/designation given to the newlevel is greater than numbers given to levels that preceded the newlevel in time. For example, if the most recent level created is assignedthe value 8, then a newly created level may be assigned the value 9. Inthis manner a temporal relationship between the levels may beestablished or determined. As may be appreciated, numerical values neednot be strictly sequential. Additionally, alternative embodiments mayreverse the numbering scheme such that newer levels have smallernumerical designations. Further, other embodiments may utilizenon-numerical designations to distinguish between levels. Numerous suchembodiments are possible and are contemplated. Each next older level hasa label decremented by one from a label integer value of a previousyounger level. A separate table not shown may be used to logicallydescribe the mapping table. For example, each entry of the separatetable may include a given level ID and a list of the page IDs storedwithin the given level ID.

By creating a new highest level for an insertion of new records, themapping table is updated by appending the new records. In oneembodiment, a single level is created as a new highest level and each ofthe new records is inserted into the single level. In anotherembodiment, the new records may be searched for duplicate keys prior toinsertion into the mapping table. A single level may be created as a newhighest level. When a given record storing a duplicate key is found,each of the records buffered ahead of the given record may be insertedinto the single level. The new records may be buffered in a manner topreserve memory ordering, such as in-order completion of requests. Thenanother single level may be created and the remainder of the new recordsmay be inserted into this other single level unless another recordstoring a duplicate key is found. If such a record is found, then thesteps are repeated. Existing records within the mapping table storing asame key value as one of the new records are not edited or overwrittenin-place by the insertion of the new records.

Although the sizes of the levels are illustrated as increasing withlower levels being larger than newer levels, the higher levels mayalternate between being larger or smaller than neighboring levels. Thenumber of newer records to insert into the mapping table may vary overtime and create the fluctuating level sizes. The lower levels may belarger than newer levels due to flattening of the lower levels. Two ormore lower levels may be flattened into a single level when particularconditions are detected. Further details are provided later.

With no edits in-place for the records stored in the mapping table,newer records placed in higher levels may override records storing asame key value located in the lower levels. For example, when themapping table is accessed by a given key value, one or more levels maybe found to store a record holding a key value matching the given keyvalue. In such a case, the highest level of the one or more levels maybe chosen to provide the information stored in its corresponding recordas a result of the access. Further details are provided later. Inaddition, further details about the detected conditions for insertingone or more new records into the mapping table and the storage ofinformation are provided later.

In one embodiment, entries within a given page may be sorted by key. Forexample, the entries may be sorted in ascending order according to a keyincluded in the entry. Additionally, in various embodiments, the pageswithin a level may be sorted according to any desired sort order. Invarious embodiments, the pages within a level may also be sorted (e.g.,according to key values or otherwise). In the example of FIG. 2, page210 a of Level N includes records sorted according to key value inascending order. In various embodiments, one or more columns may be usedto store key values. In the example of FIG. 2, two columns or fields areshown in each tuple for storing key values. Utilizing such key values,the records then may be sorted in a desired order. Sorting may beperformed based on any of the key values for a records, or anycombination of key values for the record. In the example shown, thefirst record stores a key value including 0 and 8 stored in two columns,and the last record stores a key value including 12 and 33. In thisillustrated example, each sorted record in page 210 a between the firstand the last record stores a key value between 0 and 12 in the firstcolumn and the records are arranged in a manner to store key valuesbased (at least in part) on the first column in an ascending order from0 to 12. Similarly, page 210 includes sorted records, wherein the firstrecord stores key values of 12 and 39 and the last record stores keyvalues of 31 and 19. In this illustrated example, each sorted record inpage 210 b between the first and the last record stores a key valuebetween 12 and 31 in the first column and the records are arranged in amanner to store key values in an ascending order from 12 to 31.

In addition to the above, the pages within Level N are sorted accordingto a desired order. In various embodiments, pages within a level may besorted in a manner that reflects the order in which entries within apage are sorted. For example, pages within a level may be sortedaccording to key values in ascending order. As the first key value inpage 210 b is greater than the last key value in page 210 a, page 210 bfollows page 210 a in the sort order. Page 210 g would then includeentries whose key values are greater than those included in pages 210a-210 f (not shown). In this manner, all entries within a level aresorted according to a common scheme. The entries are simply subdividedinto page, or other, size units. As may be appreciated, other sortingschemes may be used as desired.

Referring now to FIG. 3A, a generalized block diagram of one embodimentof a primary index used to access a mapping table is shown. A keygenerator 304 may receive one or more requester data inputs 302. In oneembodiment, a mapping table is an address translation directory table. Agiven received read/write request may identify a particular volume,sector and length. The key generator 304 may produce a query key value306 that includes a volume identifier (ID), a logical or virtualaddress, a snapshot ID, and a sector number. Other combinations arepossible and other or additional values may be utilized as well.Different portions of the query key value 306 may be compared to valuesstored in columns that may or may not be contiguous within the mappingtable. In the shown example, a key value of “22” is used for ease ofillustration.

As described earlier, both a chunking algorithm and/or a segmentingalgorithm associated with the key generator 304 may receive data 302corresponding to a storage access request. These algorithms may produceone or more data components and select a hash function to calculate acorresponding hash value, or query key value 306, for each datacomponent. The resulting hash value may be used to index thededuplication table.

A primary index 310, as shown in FIG. 3A, may provide locationidentifying information for data stored in the storage devices 176 a-176m. For example, referring again to FIG. 2, a corresponding primary index310 (or portion thereof) may be logically included in each of level “1”,level “2” and level “N”. Again, each level and each correspondingprimary index may be physically stored in a random-access manner withinthe storage devices 176 a-176 m.

In one embodiment, the primary index 310 may be divided into partitions,such as partitions 312 a-312 b. In one embodiment, the size of thepartitions may range from a 4 kilobyte (KB) page to 256 KB, though othersizes are possible and are contemplated. Each entry of the primary index310 may store a key value. In addition, each entry may store acorresponding unique virtual page identifier (ID) and a level IDcorresponding to the key value. Each entry may store correspondingstatus information such as validity information. When the primary index310 is accessed with a query key value, the entries within the index 310may be searched for one or more entries which match, or otherwisecorrespond to, the key value. Information from the matching entry maythen be used to locate and retrieve a mapping which identifies a storagelocation which is the target of a received read or write request. Inother words, the index 310 identifies the locations of mappings. In oneembodiment, a hit in the index provides a corresponding page IDidentifying a page within the storage devices 176 a-176 m storing boththe key value and a corresponding physical pointer value. The pageidentified by the corresponding page ID may be searched with the keyvalue to find the physical pointer value.

In the example of FIG. 3A, a received request corresponds to a key “22”.This key is then used to access index 310. A search of the index 310results on a hit to an entry within partition 312 b. The matching entryin this case include information such as—page 28, and level 3. Basedupon this result, the desired mapping for the request is found in a pageidentified as page 28 within level 3 of the mapping tables. Using thisinformation, an access may then be made to the mapping tables toretrieve the desired mapping. If an access to the primary index 310requires an access to storage, then at least two storage accesses wouldbe required in order to obtain a desired mapping. Therefore, in variousembodiments as described below, portions of the primary index arecached, or otherwise stored in a relatively fast access memory, in orderto eliminate one access to the storage devices. In various embodiments,the entire primary index for the mapping tables is cached. In someembodiments, where the primary index has become too large to cache inits entirety, or is otherwise larger than desired, secondary, tertiary,or other index portions may be used in the cache to reduce its size.Secondary type indices are discussed below. In addition to the above, invarious embodiments mapping pages corresponding to recent hits are alsocached for at least some period of time. In this manner, processes whichexhibit accesses with temporal locality can be serviced more rapidly(i.e., recently accessed locations will have their mappings cached andreadily available).

Referring now to FIG. 3B, a generalized block diagram of one embodimentof a cached primary index used to access a mapping table is shown.Circuit and logic portions corresponding to those of FIG. 3A arenumbered identically. The cached primary index 314 may include copies ofinformation stored in each of the primary indexes 310 for the multiplelevels in a mapping table. The primary index 314 may be stored in one ormore of RAM 172, buffers within controller 174, memory medium 130 andcaches within processor 122. In one embodiment, the primary index 314may be sorted by key value, though sorting otherwise is possible. Theprimary index 314 may also be divided into partitions, such aspartitions 316 a-316 b. In one embodiment, the size of the partitions316 a-316 b may be a same size as the partitions 312 a-312 b within theprimary index 310.

Similar to the primary index 310, each entry of the primary index 314may store one or more of a key value, a corresponding unique virtualpage identifier (ID), a level ID corresponding to the key value, andstatus information such as valid information. When the primary index 314is accessed with a query key value 306, it may convey a correspondingpage ID identifying a page within the storage devices 176 a-176 mstoring both the key value and a corresponding pointer value. The pageidentified by the corresponding page ID may be searched with the keyvalue to find the pointer value. As shown, the primary index 314 mayhave multiple records storing a same key value. Therefore, multiple hitsmay result from the search for a given key value. In one embodiment, ahit with a highest value of a level ID (or whatever indicator is used toidentify a youngest level or most recent entry) may be chosen. Thisselection of one hit from multiple hits may be performed by merge logicnot shown here. A further description of the merge logic is providedlater.

Turning now to FIG. 4, a generalized block diagram of another embodimentof a mapping table and primary index used to access the mapping table isshown. Circuit and logic portions corresponding to those of FIG. 3A arenumbered identically. Mapping table 340 may have a similar structure asthe mapping table shown in FIG. 2. However, storage of a correspondingprimary index 310 for each level is now shown. A copy of one or more ofthe primary index portions 310 a-310 i may be included in index copies330 (e.g., cached copies). Copies 330 may generally correspond to thecached index depicted in FIG. 3B. The information in index copies 330may be stored in RAM 172, buffers within controller 174, memory medium130, and caches within processor 122. In the embodiment shown, theinformation in primary indexes 310 a-310 i may be stored with the pagesof mappings in storage devices 176 a-176 m. Also shown is a secondaryindex 320 which may be used to access a primary index, such as primaryindex 310 i shown in the diagram. Similarly, accessing and updating themapping table 340 may occur as described earlier.

Mapping table 340 comprises multiple levels, such as Level “1” to Level“N”. In the illustrated example, each of the levels includes multiplepages. Level “N” is shown to include pages “0” to “D”, Level N−1includes pages “E” to “G”, and so forth. Again, the levels within themapping table 310 may be sorted by time. Level “N” may be younger thanLevel “N−1” and so forth. Mapping table 340 may be accessed by at leasta key value. In the illustrated example, mapping table 340 is accessedby a key value “27” and a page ID “32”. For example, in one embodiment,a level ID “8” may be used to identify a particular level (or“subtable”) of the mapping table 340 to search. Having identified thedesired subtable, the page ID may then be used to identify the desiredpage within the subtable. Finally, the key may be used to identify thedesired entry within the desired page.

As discussed above, an access to the cached index 330 may result inmultiple hits. In one embodiment, the results of these multiple hits areprovided to merge logic 350 which identifies which hit is used to accessthe mapping table 340. Merge logic 350 may represent hardware and/orsoftware which is included within a storage controller. In oneembodiment, merge logic 350 is configured to identify a hit whichcorresponds to a most recent (newest) mapping. Such an identificationcould be based upon an identification of a corresponding level for anentry, or otherwise. In the example shown, a query corresponding tolevel 8, page 32, key 27 is received. Responsive to the query, page 32of level 8 is accessed. If the key 27 is found within page 32 (a hit),then a corresponding result is returned (e.g., pointer xF3209B24 in theexample shown). If the key 27 is not found within page 32, then a missindication is returned. This physical pointer value may be output fromthe mapping table 340 to service a storage access request correspondingto the key value “27”.

In one embodiment, the mapping table 340 supports inline mappings. Forexample, a mapping detected to have a sufficiently small target may berepresented without an actual physical sector storing user data withinthe storage devices 176 a-176 m.

One example may be a repeating pattern within the user data. Rather thanactually store multiple copies of a repeated pattern (e.g., a series ofzeroes) as user data within the storage devices 176 a-176 m, acorresponding mapping may have an indication marked in the statusinformation, such as within one of the fields of field0 to fieldN in themapping table, that indicates what data value is to be returned for aread request. However, there is no actual storage of this user data at atarget location within the storage devices 176 a-176 m. Additionally, anindication may be stored within the status information of the primaryindex 310 and any additional indexes that may be used (not shown here).

In addition to the above, in various embodiments the storage system maysimultaneously support multiple versions of the data organization,storage schemes, and so on. For example, as the system hardware andsoftware evolve, new features may be incorporated or otherwise provided.Data, indexes, and mappings (for example) which are newer may takeadvantage of these new features. In the example of FIG. 4, new level Nmay correspond to one version of the system, while older level N−1 maycorrespond to a prior version. In order to accommodate these differentversions, metadata may be stored in association with each of the levelswhich indicates which version, which features, compression schemes, andso on, are used by that level. This metadata could be stored as part ofthe index, the pages themselves, or both. When accesses are made, thismetadata then indicates how the data is to be handled properly.Additionally, new schemes and features can be applied dynamicallywithout the need to quiesce the system. In this manner, upgrading of thesystem is more flexible and a rebuild of older data to reflect newerschemes and approaches is not necessary.

Turning now to FIG. 5A, one embodiment of a method for servicing a readaccess is shown. The components embodied in the network architecture 100and mapping table 340 described above may generally operate inaccordance with method 500. For purposes of discussion, the steps inthis embodiment are shown in sequential order. However, some steps mayoccur in a different order than shown, some steps may be performedconcurrently, some steps may be combined with other steps, and somesteps may be absent in another embodiment.

Read and store (write) requests may be conveyed from one of the clients110 a-110 c to one of the data storage arrays 120 a-120 b. In theexample shown, a read request 500 is received, and in block 502 acorresponding query key value may be generated. In some embodiments, therequest itself may include the key which is used to access the index anda “generation” of the key 502 is not required. As described earlier, thequery key value may be a virtual address index comprising a volume ID, alogical address or virtual address associated with a received request, asnapshot ID, a sector number, and so forth. In embodiments which areused for deduplication, the query key value may be generated using ahash function or other function. Other values are possible andcontemplated for the query key value, which is used to access a mappingtable.

In block 504, the query key value may be used to access one or morecached indexes to identify one or more portions of a mapping table thatmay store a mapping that corresponds to the key value. Additionally,recently used mappings which have been cached may be searched as well.If a hit on the cached mappings is detected (block 505), the cachedmapping may be used to perform the requested access (block 512). Ifthere is no hit on the cached mappings, the a determination may be madeas to whether or not there is a hit on the cached index (block 506). Ifso, a result corresponding to the hit is used to identify and access themapping table (block 508). For example, with the primary index 310, anentry storing the query key value also may store a unique virtual pageID that identifies a single particular page within the mapping table.This single particular page may store both the query key value and anassociated physical pointer value. In block 508, the identified potionof the mapping table may be accessed and a search performed using thequery key value. The mapping table result may then be returned (block510) and used to perform a storage access (block 512) that correspondsto the target location of the original read request.

In some embodiments, an index query responsive to a read request mayresult in a miss. Such a miss could be due to only a portion of theindex being cached or an error condition (e.g., a read access to anon-existent location, address corruption, etc.). In such a case, anaccess to the stored index may be performed. If the access to the storedindex results in a hit (block 520), then a result may be returned (block522) which is used to access the mapping tables (block 508). On theother hand, if the access to the stored index results in a miss, then anerror condition may be detected. Handling of the error condition may bedone in any of a variety of desired ways. In one embodiment, anexception may be generated (block 524) which is then handled as desired.In one embodiment, a portion of the mapping table is returned in block510. In various embodiments, this portion is a page which may be a 4KBpage, or otherwise. As previously discussed, the records within a pagemay be sorted to facilitate faster searches of the content includedtherein.

In one embodiment, the mapping table utilizes traditional databasesystems methods for information storage in each page. For example, eachrecord (or row or entry) within the mapping table is stored one rightafter the other. This approach may be used in row-oriented or row-storedatabases and additionally with correlation databases. These types ofdatabases utilize a value-based storage structure. A value-based storage(VBS) architecture stores a unique data value only once and anauto-generated indexing system maintains the context for all values. Invarious embodiments, data may be stored by row and compression may beused on the columns (fields) within a row. In some embodiments, thetechniques used may include storing a base value and having a smallerfield size for the offset and/or having a set of base values, with acolumn in a row consisting of a base selector and an offset from thatbase. In both cases, the compression information may be stored within(e.g., at the start) of the partition.

In some embodiments, the mapping table utilizes a column-orienteddatabase system (column-store) method for information storage in eachpage. Column-stores store each database table column separately. Inaddition, attribute values belonging to a same column may be storedcontiguously, compressed, and densely packed. Accordingly, reading asubset of a table's columns, such as within a page, may be performedrelatively quickly. Column data may be of uniform type and may allowstorage size optimizations to be used that may not be available inrow-oriented data. Some compression schemes, such as Lempel-Ziv-Welch(LZ) and run-length encoding (RLE), take advantage of a detectedsimilarity of adjacent data to compress. A compression algorithm may bechosen that allows individual records within the page to be identifiedand indexed. Compressing the records within the mapping table may enablefine-grained mapping. In various embodiments, the type of compressionused for a particular portion of data may be stored in association withthe data. For example, the type of compression could be stored in anindex, as part of a same page as the compressed data (e.g., in a headerof some type), or otherwise. In this manner, multiple compressiontechniques and algorithms may be used side by side within the storagesystem. In addition, in various embodiments the type of compression usedfor storing page data may be determined dynamically at the time the datais stored. In one embodiment, one of a variety of compression techniquesmay be chosen based at least in part on the nature and type of databeing compressed. In some embodiments, multiple compression techniqueswill be performed and the one exhibiting the best compression will thenbe selected for use in compressing the data. Numerous such approachesare possible and are contemplated.

If there is a match of the query key value 306 found in any of thelevels of the mapping table (block 508), then in block 510, one or moreindications of a hit may be conveyed to the merge logic 350. Forexample, one or more hit indications may be conveyed from levels “1” to“J” as shown in FIG. 4. The merge logic 350 may choose the highestlevel, which may also be the youngest level, of the levels “1” to “J”conveying a hit indication. The chosen level may provide informationstored in a corresponding record as a result of the access.

In block 512, one or more corresponding fields within a matching recordof a chosen page may be read to process a corresponding request. In oneembodiment, when the data within the page is stored in a compressedformat, the page is decompressed and a corresponding physical pointervalue is read out. In another embodiment, only the matching record isdecompressed and a corresponding physical pointer value is read out. Inone embodiment, a full physical pointer value may be split between themapping table and a corresponding target physical location. Therefore,multiple physical locations storing user data may be accessed tocomplete a data storage access request.

Turning now to FIG. 5B, one embodiment of a method corresponding to areceived write request is shown. Responsive to a received write request(block 530), a new mapping table entry corresponding to the request maybe created (block 532). In one embodiment, a new virtual-to-physicaladdress mapping may be added (block 534) to the mapping table that pairsthe virtual address of the write request with the physical locationstoring the corresponding data component. In various embodiments, thenew mapping may be cached with other new mappings and added to a newhighest level of the mapping table entries. The write operation topersistent storage (block 536) may then be performed. In variousembodiments, writing the new mapping table entry to the mapping tablesin persistent storage may not be performed until a later point in time(block 538) which is deemed more efficient. As previously discussed, ina storage system using solid state storage devices, writes to storageare much slower than reads from storage. Accordingly, writes to storageare scheduled in such a way that they minimize impact on overall systemperformance. In some embodiments, the insertion of new records into themapping table may be combined with other larger data updates. Combiningthe updates in this manner may provide for more efficient writeoperations. It is noted that in the method of 5B, as with each of themethods described herein, operations are described as occurring in aparticular order for ease of discussion. However, the operations may infact occur in a different order, and in some cases various ones of theoperations may occur simultaneously. All such embodiments arecontemplated.

In addition to the above, deduplication mechanisms may be used in someembodiments. FIG. 5B depicts operations 550 which may generallycorrespond to deduplication systems and methods. In the example shown, ahash corresponding to a received write request may be generated (block540) which is used to access deduplication tables (block 542). If thereis a hit (block 544) in the deduplication tables (i.e., a copy of thedata already exists within the system), then a new entry may be added tothe deduplication tables (block 548) to reflect the new write. In such acase, there is no need to write the data itself to storage and thereceived write data may be discarded. Alternatively, if there is a missin the deduplication table, then a new entry for the new data is createdand stored in the deduplication tables (block 546). Additionally, awrite of the data to storage is performed (block 536). Further, a newentry may be created in the index to reflect the new data (block 538).In some embodiments, if a miss occurs during an inline deduplicationoperation, no insertion in the deduplication tables is performed at thattime. Rather, during an inline deduplication operation, a query with ahash value may occur for only a portion of the entire deduplicationtable (e.g., a cached portion of the deduplication table). If a missoccurs, a new entry may be created and stored in the cache.Subsequently, during a post-processing deduplication operation, such asan operation occurring during garbage collection, a query with a hashvalue may occur for the entire deduplication table. A miss may indicatethe hash value is a unique hash value. Therefore, a new entry such as ahash-to-physical-pointer mapping may be inserted into the deduplicationtable. Alternatively, if a hit is detected during post-processingdeduplication (i.e., a duplicate is detected), deduplication may beperformed to eliminate one or more of the detected copies.

Referring now to FIG. 6, a generalized block diagram of one embodimentof a multi-node network with shared mapping tables is shown. In theexample shown, three nodes 360 a-360 c are used to form a cluster ofmapping nodes. In one embodiment, each of the nodes 360 a-360 c may beresponsible for one or more logical unit numbers (LUNs). In the depictedembodiment, a number of mapping table levels, level 1-N, are shown.Level 1 may correspond to the oldest level, while level N may correspondto the newest level. For mapping table entries of LUNs managed by aparticular node, that particular node may itself have newer entriesstored on the node itself. For example, node 360 a is shown to storemapping subtables 362 a and 364 a. These subtables 362 a and 362 b maycorrespond to LUNs for which node 360 a is generally responsible.Similarly, node 360 b includes subtables 362 b and 364 b which maycorrespond to LUNs managed by that node, while node 360 c includessubtables 362 c and 364 c which may correspond to LUNs managed by thatnode. In such an embodiment, these “newer” level mapping table entriesare maintained only by their corresponding managing nodes and aregenerally not found on other nodes.

In contrast to the above discussed relatively newer levels, older levels(i.e., levels N−2 down to level 1) represent mapping table entries whichmay be shared by all nodes 360 a-360 c in the sense that any of thenodes may be storing a copy of those entries. In the example shown,these older levels 370, 372, and 374 are collectively identified asshared tables 380. Additionally, as previously discussed, in variousembodiments these older levels are static—apart from merging or similaroperations which are discussed later. Generally speaking, a static layeris one which is not subject to modification (i.e., it is “fixed”). Giventhat such levels are fixed in this sense, an access to any copy of theselower levels may be made without concern for whether another of thecopies has been, or is being, modified. Consequently, any of the nodesmay safely store a copy of the shared tables 380 and service a requestto those tables with confidence the request can be properly serviced.Having copies of the shared tables 380 stored on multiple nodes 360 mayallow use of various load balancing schemes when performing lookups andotherwise servicing requests.

In addition to the above, in various embodiments, the levels 380 whichmay be shared may be organized in a manner which reflects the nodes 360themselves. For example, node 360 a may be responsible for LUNs 1 and 2,node 360 b may be responsible for LUNs 3 and 4, and node 360 c may beresponsible for LUNs 5 and 6. In various embodiments, the mapping tableentries may include tuples which themselves identify a correspondingLUN. In such an embodiment, the shared mapping tables 380 may be sortedaccording to key value, absolute width or amount of storage space, orotherwise. If a sort of mapping table entries in the levels 380 is basedin part on LUN, then entries 370 a may correspond to LUNs 1 and 2,entries 370 b may correspond to LUNs 3 and 4, and entries 370 c maycorrespond to LUNs 5 and 6. Such an organization may speed lookups by agiven node for a request targeted to a particular LUN by effectivelyreducing the amount of data that needs to be searched, allowing acoordinator to directly select the node responsible for a particular LUNas the target of a request. These and other organization and sortschemes are possible and are contemplated. In addition, if it is desiredto move responsibility for a LUN from one node to another, the originalnode mappings for that node may be flushed to the shared levels (e.g.,and merged). Responsibility for the LUN is then transferred to the newnode which then begins servicing that LUN.

Referring now to FIG. 7, a generalized block diagram of one embodimentof a secondary index used to access a mapping table is shown. Asdescribed earlier, requester data inputs 302 may be received by a keygenerator 304, which produces a query key value 306. The query key value306 is used to access a mapping table. In some embodiments, the primaryindex 310 shown in FIG. 3 may be too large (or larger than desired) tostore in RAM 172 or memory medium 130. For example, older levels of theindex may grow very large due to merging and flattening operationsdescribed later in FIG. 10 and FIG. 11. Therefore, a secondary index 320may be cached for at least a portion of the primary index instead of thecorresponding portion of the primary index 310. The secondary index 320may provide a more coarse level of granularity of locationidentification of data stored in the storage devices 176 a-176 m.Therefore, the secondary index 320 may be smaller than the portion ofthe primary index 310 to which it corresponds. Accordingly, thesecondary index 320 may be stored in RAM 172 or in memory medium 130.

In one embodiment, the secondary index 320 is divided into partitions,such as partitions 322 a-322 b. Additionally, the secondary index may beorganized according to level with the more recent levels appearingfirst. In one embodiment, older levels have lower numbers and youngerlevels have higher numbers (e.g., a level ID may be incremented witheach new level). Each entry of the secondary index 320 may identify arange of key values. For example, the first entry shown in the examplemay identify a range of key values from 0 to 12 in level 22. These keyvalues may correspond to key values associated with a first record and alast record within a given page of the primary index 310. In otherwords, the entry in the secondary index may simply store anidentification of key 0 and an identification of key 12 to indicate thecorresponding page includes entries within that range. Referring againto FIG. 3A, partition 312 a may be a page and the key values of itsfirst record and its last record are 0 and 12, respectively. Therefore,an entry within the secondary index 320 stores the range 0 to 12 asshown in FIG. 7. Since remappings are maintained in the levels withinthe mapping table, a range of key values may correspond to multiplepages and associated levels. The fields within the secondary index 320may store this information as shown in FIG. 7. Each entry may store oneor more corresponding unique virtual page identifiers (IDs) andassociated level IDs corresponding to the range of key values. Eachentry may also store corresponding status information such as validityinformation. The list of maintained page IDs and associated level IDsmay indicate where a given query key value might be stored, but notconfirm that the key value is present in that page and level. Thesecondary index 320 is smaller than the primary index 310, but also hasa coarse-level of granularity of location identification of data storedin the storage devices 176 a-176 m. The secondary index 320 may besufficiently small to store in RAM 172 or in memory medium 130.

When the secondary index 320 is accessed with a query key value 306, itmay convey one or more corresponding page IDs and associated level IDs.These results are then used to access and retrieve portions of thestored primary index. The one or more identified pages may then besearched with the query key value to find a physical pointer value. Inone embodiment, the level IDs may be used to determine a youngest levelof the identified one or more levels that also store the query key value306. A record within a corresponding page may then be retrieved and aphysical pointer value may be read for processing a storage accessrequest. In the illustrated example, the query key value 27 is withinthe range of keys 16 to 31. The page IDs and level IDs stored in thecorresponding entry are conveyed with the query key value to the mappingtable.

Referring now to FIG. 8, a generalized block diagram of one embodimentof a tertiary index used to access a mapping table is shown. Circuit andlogic portions corresponding to those of FIG. 4 are numberedidentically. As described earlier, the primary index 310 shown in FIG. 3may be too large to store in RAM 172 or memory medium 130. In addition,as the mapping table 340 grows, the secondary index 320 may also becometoo large to store in these memories. Therefore, a tertiary index 330may be accessed prior to the secondary index 320, which may still befaster than accessing the primary index 310.

The tertiary index 330 may provide a more coarse level of granularitythan the secondary index 320 of location identification of data storedin the storage devices 176 a-176 m. Therefore, the tertiary index 330may be smaller than the portion of the secondary index 320 to which itcorresponds. It is noted that each of the primary index 310, thesecondary index 320, the tertiary index 330, and so forth, may be storedin a compressed format. The compressed format chosen may be a samecompressed format used to store information within the mapping table340.

In one embodiment, the tertiary index 330 may include multiplepartitions, such as partitions 332 a, 332 b and so forth. The tertiaryindex 330 may be accessed with a query key value 306. In the illustratedexample, a query key value 306 of “27” is found to be between a range ofkey values from 0 to 78. A first entry in the tertiary index 330corresponds to this key value range. A column in the tertiary index 330may indicate which partition to access within the secondary index 320.In the illustrated example, a key value range of 0 to 78 corresponds topartition 0 within the secondary index 320.

It is also noted a filter (not shown) may be accessed to determine if aquery key value is not within any one of the indexes 310-330. Thisfilter may be a probabilistic data structure that determines whether anelement is a member of a set. False positives may be possible, but falsenegatives may not be possible. One example of such a filter is a Bloomfilter. If an access of such a filter determines a particular value isnot in the full index 142, then no query is sent to the storage. If anaccess of the filter determines the query key value is in acorresponding index, then it may be unknown whether a correspondingphysical pointer value is stored in the storage devices 176 a-176 m.

In addition to the above, in various embodiments one or more overlaytables may be used to modify or elide tuples provided by the mappingtable in response to a query. Such overlay tables may be used to applyfiltering conditions for use in responding to accesses to the mappingtable or during flattening operations when a new level is created. Invarious embodiments, other hardware and/or software may be used to applyfiltering conditions. In some embodiments, the overlay table may beorganized as time ordered levels in a manner similar to the mappingtable described above. In other embodiments, they be organizeddifferently. Keys for the overlay table need not match the keys for theunderlying mapping table. For example, an overlay table may contain asingle entry stating that a particular volume has been deleted or isotherwise inaccessible (e.g., there is no natural access path to querythis tuple), and that a response to a query corresponding to a tuplethat refers to that volume identifier is instead invalid. In anotherexample, an entry in the overlay table may indicate that a storagelocation has been freed, and that any tuple that refers to that storagelocation is invalid, thus invalidating the result of the lookup ratherthan the key used by the mapping table. In some embodiments, the overlaytable may modify fields in responses to queries to the underlyingmapping table. In some embodiments, a key range (range of key values)may be used to efficiently identify multiple values to which the sameoperation (eliding or modification) is applied. In this manner, tuplesmay (effectively) be “deleted” from the mapping table by creating an“elide” entry in the overlay table and without modifying the mappingtable. In this case, the overlay table may include keys with noassociated non-key data fields.

Turning now to FIG. 9, one embodiment of a method for processing a readrequest in a system including mapping and overlay tables is shown.Responsive to a read request being received (block 900), a mapping tablekey (block 908) and first overlay table key (block 902) corresponding tothe request are generated. In this example, access to the overlay andmapping tables is shown as occurring concurrently. However, in otherembodiments, accesses to the tables may be performed non-concurrently(e.g., sequentially or otherwise separate in time) in any desired order.Using the key generated for the mapping table, a corresponding tuple maybe retrieved from the mapping table (block 910). If the first overlaytable contains an “elide” entry corresponding to the overlay table key(conditional block 906), any tuple found in the mapping table is deemedinvalid and an indication to this effect may be returned to therequester. On the other hand, if the overlay table contains a “modify”entry corresponding to the overlay table key (conditional block 912),the values in the first overlay table entry may be used to modify one ormore fields in the tuple retrieved from the mapping table (block 922).Once this process is done, a second overlay table key is generated(block 914) based on the tuple from the mapping table (whether modifiedor not) and a second lookup is done in a second overlay table (block916) which may or may not be the same table as the first overlay table.If an “elide” entry is found in the second overlay table (conditionalblock 920), the tuple from the mapping table is deemed invalid (block918). If a “modify” entry is found in the second overlay table(conditional block 924), one or more fields of the tuple from themapping table may be modified (block 926). Such modification may includedropping a tuple, normalizing a tuple, or otherwise. The modified tuplemay then be returned to the requester. If the second overlay table doesnot contain a modify entry (conditional block 924), the tuple may bereturned to the requester unmodified. In some embodiments, at least someportions of the overlay table(s) may be cached to provide faster accessto their contents. In various embodiments, a detected elide entry in thefirst overlay table may serve to short circuit any other correspondinglookups (e.g., blocks 914, 916, etc.). In other embodiments, accessesmay be performed in parallel and “raced.” Numerous such embodiments arepossible and are contemplated.

Turning now to FIG. 10, a generalized block diagram of one embodiment ofa flattening operation for levels within a mapping table is shown. Invarious embodiments, a flattening operation may be performed in responseto detecting one or more conditions. For example, over time as themapping table 340 grows and accumulates levels due to insertions of newrecords, the cost of searching more levels for a query key value maybecome undesirably high. In order to constrain the number of levels tosearch, multiple levels may be flattened into a single new level. Forexample, two or more levels which are logically adjacent or contiguousin time order may be chosen for a flattening operation. Where two ormore records correspond to a same key value, the youngest record may beretained while the others are not included in the new “flattened” level.In such an embodiment, the newly flattened level will return a sameresult for a search for a given key value as would be provided by asearch of the corresponding multiple levels. Since the results ofsearches in the new flattened level do not change as compared to the twoor more levels it replaces, the flattening operation need not besynchronized with update operations to the mapping table. In otherwords, flattening operations on a table may be performed asynchronouslywith respect to updates to the table.

As previously noted, older levels are fixed in the sense that theirmappings are not modified (i.e., a mapping from A to B remainsunchanged). Consequently, modifications to the levels being flattenedare not being made (e.g., due to user writes) and synchronization locksof the levels are not required. Additionally, in a node-based clusterenvironment where each node may store a copy of older levels of theindex (e.g., as discussed in relation to FIG. 6), flattening operationsmay be undertaken on one node without the need to lock correspondinglevels in other nodes. Consequently, processing may continue in allnodes while flattening takes place in an asynchronous manner on any ofthe nodes. At a later point in time, other nodes may flatten levels, oruse an already flattened level. In one embodiment, the two or morelevels which have been used to form a flattened level may be retainedfor error recovery, mirroring, or other purposes. In addition to theabove, in various embodiments, records that have been elided may not bereinserted in to the new level. The above described flattening may, forexample, be performed responsive to detecting the number of levels inthe mapping table has reached a given threshold. Alternatively, theflattening may be performed responsive to detecting the size of one ormore levels has exceeded a threshold. Yet another condition that may beconsidered is the load on the system. The decision of whether to flattenthe levels may consider combinations of these conditions in addition toconsidering them individually. The decision of whether to flatten mayalso consider both the present value for the condition as well as apredicted value for the condition in the future. Other conditions forwhich flattening may be performed are possible and are contemplated.

In the illustrated example, the records are shown simply as key andpointer pairs. The pages are shown to include four records for ease ofillustration. A level “F” and its next contiguous logical neighbor,level “F−1” may be considered for a flattening operation. Level “F” maybe younger than Level “F−1”. Although two levels are shown to beflattened here, it is possible and contemplated that three or morelevels may be chosen for flattening. In the example shown, Level “F−1”may have records storing a same key value found in Level “F”.Bidirectional arrows are used to identify the records storing a same keyvalue across the two contiguous levels.

The new Level “New F” includes a key corresponding to the duplicate keyvalues found in Level “F” and Level “F−1”. In addition, the new Level“New F” includes a pointer value corresponding to the youngest (oryounger in this case) record of the records storing the duplicate keyvalue. For example, each of Level “F” and Level “F−1” includes a recordstoring the key value 4. The younger record is in Level “F” and thisrecord also stores the pointer value 512. Accordingly, the Level “F−1”includes a record storing the key value 4 and also the pointer value512, rather than the pointer value 656 found in the older Level “F−1”.Additionally, the new Level “New F” includes records with unique keyvalues found between Level “F” and Level “F-1”. For example, the Level“F−1” includes records with the key and pointer pair of 6 and 246 foundin Level “F” and the key and pointer pair of 2 and 398 found in Level“F−1”. As shown, each of the pages within the levels is sorted by keyvalue.

As noted above, in various embodiments an overlay table may be used tomodify or elide tuples corresponding to key values in the underlyingmapping table. Such an overlay table(s) may be managed in a mannersimilar to that of the mapping tables. For example, an overlay table maybe flattened and adjacent entries merged together to save space.Alternatively, an overlay table may be managed in a manner differentfrom that used to manage mapping tables. In some embodiments, an overlaytable may contain a single entry that refers to a range of overlay tablekeys. In this way, the size of the overlay table can be limited. Forexample, if the mapping table contains k valid entries, the overlaytable (after flattening) need contain no more than k+1 entries markingranges as invalid, corresponding to the gaps between valid entries inthe mapping table. Accordingly, the overlay table may used to identifytuples that may be dropped from the mapping table in a relativelyefficient manner. In addition to the above, while the previousdiscussion describes using overlay table to elide or modify responses torequests from the mapping table(s), overlay tables may also be used toelide or modify values during flattening operations of the mappingtables. Accordingly, when a new level is created during a flatteningoperation of a mapping table, a key value that might otherwise beinserted into the new level may be elided. Alternatively, a value may bemodified before insertion in the new level. Such modifications mayresult in a single record corresponding to a given range of key valuesin the mapping table being replaced (in the new level) with multiplerecords—each corresponding to a subrange of the original record.Additionally, a record may be replaced with a new record thatcorresponds to a smaller range, or multiple records could be replaced bya single record whose range covers all ranges of the original records.All such embodiments are contemplated.

Referring now to FIG. 11, a generalized block diagram of an embodimentof a flattening operation for levels within a mapping table is shown. Aspreviously discussed, levels may be time ordered. In the illustratedexample, a Level “F” comprising one or more indexes and correspondingmappings is logically located above older Level “F−1”. Also, Level “F”is located logically below younger Level “F+1”. Similarly, Level “F−2”is logically located above younger Level “F−1” and Level “F+2” islogically located below older Level “F+1”. In one example, levels “F”and “F−1” may be considered for a flattening operation. Bidirectionalarrows are used to illustrate there are records storing same key valuesacross the two contiguous levels.

As described earlier, a new Level “New F” includes key valuescorresponding to the duplicate key values found in Level “F” and Level“F−1”. In addition, the new Level “New F” includes a pointer valuecorresponding to the youngest (or younger in this case) record of therecords storing the duplicate key value. Upon completion of theflattening operation, the Level “F” and the Level “F−1” may not yet beremoved from the mapping table. Again, in a node-based cluster, eachnode may verify it is ready to utilize the new single level, such asLevel “New F”, and no longer use the two or more levels it replaces(such as Level “F” and Level “F−1”). This verification may be performedprior to the new level becoming the replacement. In one embodiment, thetwo or more replaced levels, such as Level “F” and Level “F−1”, may bekept in storage for error recovery, mirroring, or other purposes. Inorder to maintain the time ordering of the levels and their mappings,the new flattened level F is logically placed below younger levels(e.g., level F+1) and above the original levels that it replaces (e.g.,level F and level F−1).

Turning now to FIG. 12, one embodiment of a method 1000 for flatteninglevels within a mapping table is shown. The components embodied in thenetwork architecture 100 and the mapping table 340 described above maygenerally operate in accordance with method 1000. For purposes ofdiscussion, the steps in this embodiment are shown in sequential order.However, some steps may occur in a different order than shown, somesteps may be performed concurrently, some steps may be combined withother steps, and some steps may be absent in another embodiment.

In block 1002, storage space is allocated for a mapping table andcorresponding indexes. In block 1004, one or more conditions aredetermined for flattening two or more levels within the mapping table.For example, a cost of searching a current number of levels within themapping table may be greater than a cost of performing a flatteningoperation. Additionally, a cost may be based on at least one of thecurrent (or predicted) number of levels in the structure to beflattened, the number of entries in one or more levels, the number ofmapping entries that would be elided or modified, and the load on thesystem. Cost may also include a time to perform a correspondingoperation, an occupation of one or more buses, storage space used duringa corresponding operation, a number of duplicate entries in a set oflevels has reached some threshold, and so forth. In addition, a count ofa number of records within each level may be used to estimate when aflattening operation performed on two contiguous levels may produce anew single level with a number of records equal to twice a number ofrecords within a next previous level. These conditions taken singly orin any combination, and others, are possible and are contemplated.

In block 1006, the indexes and the mapping table are accessed andupdated as data is stored and new mappings are found. A number of levelswithin the mapping table increases as new records are inserted into themapping table. If a condition for flattening two or more levels withinthe mapping table is detected (conditional block 1008), then in block1010, one or more groups of levels are identified for flattening. Agroup of levels may include two or more levels. In one embodiment, thetwo or more levels are contiguous levels. Although the lowest levels, orthe oldest levels, may be the best candidates for flattening, a youngergroup may also be selected.

In block 1012, for each group a new single level comprising the newestrecords within a corresponding group is produced. In the earlierexample, the new single Level “New F” includes the youngest recordsamong the Level “F” and the Level “F+1”. In block 1014, in a node-basedcluster, an acknowledgment may be requested from each node within thecluster to indicate a respective node is ready to utilize the new levelsproduced by the flattening operation. When each node acknowledges thatit can utilize the new levels, in block 1016, the current levels withinthe identified groups are replaced with the new levels. In otherembodiments, synchronization across nodes is not needed. In suchembodiments, some nodes may begin using a new level prior to othernodes. Further, some nodes may continue to use the original level evenafter newly flattened levels are available. For example, a particularnode may have original level data cached and used that in preference tousing non-cached data of a newly flattened level. Numerous suchembodiments are possible and are contemplated.

Turning now to FIG. 13, one embodiment of a method 1100 for efficientlyprocessing bulk array tasks within a mapping table is shown. Similar tothe other described methods, the components embodied in the networkarchitecture 100 and the mapping table 340 described above may generallyoperate in accordance with method 1100. In addition, the steps in thisembodiment are shown in sequential order. However, some steps may occurin a different order than shown, some steps may be performedconcurrently, some steps may be combined with other steps, and somesteps may be absent in another embodiment.

Storing the information in a compressed format within the mapping tablemay enable fine-grained mapping, which may allow direct manipulation ofmapping information within the mapping table as an alternative to commonbulk array tasks. The direct map manipulation may reduce I/O network andbus traffic. As described earlier, Flash memory has a low “seek time”,which allows a number of dependent read operations to occur in less timethan a single operation from a spinning disk. These dependent reads maybe used to perform online fine-grained mappings to integratespace-saving features like compression and deduplication. In addition,these dependent read operations may allow the storage controller 174 toperform bulk array tasks entirely within a mapping table instead ofaccessing (reading and writing) the user data stored within the storagedevices 176 a-176 m.

In block 1102, a large or bulk array task is received. For example, abulk copy or move request may correspond to a backup of a dozens orhundreds of virtual machines in addition to enterprise application databeing executed and updated by the virtual machines. The amount of dataassociated with the received request associated with a move, branch,clone, or copy of all of this data may be as large as 16 gigabytes (GB)or larger. If the user data was accessed to process this request, a lotof processing time may be spent on the request and system performancedecreases. In addition, a virtualized environment typically has lesstotal input/output (I/O) resources than a physical environment.

In block 1104, the storage controller 174 may store an indicationcorresponding to the received request that relates a range of new keysto a range of old keys, wherein both the ranges of keys correspond tothe received request. For example, if the received request is to copy of16GB of data, a start key value and an end key value corresponding tothe 16GB of data may be stored. Again, each of the start and the end keyvalues may include a volume ID, a logical or virtual address within thereceived request, a snapshot ID, a sector number and so forth. In oneembodiment, this information may be stored separate from the informationstored in the indexes, such as the primary index 310, the secondaryindex 320, the tertiary index 330, and so forth. However, thisinformation may be accessed when the indexes are accessed during theprocessing of later requests.

In block 1106, the data storage controller 174 may convey a response toa corresponding client of the client computer systems 110 a-110 cindicating completion of the received request without prior access ofuser data. Therefore, the storage controller 174 may process thereceived request with low or no downtime and with no load on processor122.

In block 1108, the storage controller 174 may set a condition, anindication, or a flag, or buffer update operations, for updating one ormore records in the mapping table corresponding to the new keysreplacing the old keys in the mapping table. For both a move request anda copy request, one or more new records corresponding to the new keysmay be inserted in the mapping table. The keys may be inserted in acreated new highest level as described earlier. For a move request, oneor more old records may be removed from the mapping table after acorresponding new record has been inserted in the mapping table. Eitherimmediately or at a later time, the records in the mapping table areactually updated.

For a zeroing or an erase request, an indication may be stored that arange of key values now corresponds to a series of binary zeroes.Additionally, as discussed above, overlay tables may be used to identifykey values which are not (or no longer) valid. The user data may not beoverwritten. For an erase request, the user data may be overwritten at alater time when the “freed” storage locations are allocated with newdata for subsequent store (write) requests. For an externally-directeddefragmentation request, contiguous addresses may be chosen for sectorreorganization, which may benefit applications executed on a client ofthe client computer systems 110 a-110 c.

If the storage controller 174 receives a data storage access requestcorresponding to one of the new keys (conditional block 1110), and thenew key has already been inserted in the mapping table (conditionalblock 1112), then in block 1114, the indexes and the mapping table maybe accessed with the new key. For example, either the primary index 310,the secondary index 320, or the tertiary index 330 may be accessed withthe new key. When one or more pages of the mapping table are identifiedby the indexes, these identified pages may then be accessed. In block1116, the storage access request may be serviced with a physical pointervalue found in the mapping table that is associated with the new key.

If the storage controller 174 receives a data storage access requestcorresponding to one of the new keys (conditional block 1110), and thenew key has not already been inserted in the mapping table (conditionalblock 1112), then in block 1118, the indexes and the mapping table maybe accessed with a corresponding old key. The storage holding the rangeof old keys and the range of new keys may be accessed to determine thecorresponding old key value. When one or more pages of the mapping tableare identified by the indexes, these identified pages may then beaccessed. In block 1120, the storage access request may be serviced witha physical pointer value found in the mapping table that is associatedwith the old key.

Turning now to FIG. 14, a generalized block diagram illustrating anembodiment of a data layout architecture within a storage device isshown. In one embodiment, the data storage locations within the storagedevices 176 a-176 m may be arranged into redundant array of independentdevices (RAID) arrays. As shown, different types of data may be storedin the storage devices 176 a-176 k according to a data layoutarchitecture. In one embodiment, each of the storage devices 176 a-176 kis an SSD. An allocation unit within an SSD may include one or moreerase blocks within an SSD.

The user data 1230 may be stored within one or more pages includedwithin one or more of the storage devices 176 a-176 k. Within eachintersection of a RAID stripe and one of the storage devices 176 a-176k, the stored information may be formatted as a series of logical pages.Each logical page may in turn include a header and a checksum for thedata in the page. When a read is issued it may be for one or morelogical pages and the data in each page may be validated with thechecksum. As each logical page may include a page header that contains achecksum for the page (which may be referred to as a “media” checksum),the actual page size for data may be smaller than one logical page. Insome embodiments, for pages storing inter-device recovery data 1250,such as RAID parity information, the page header may be smaller, so thatthe parity page protects the page checksums in the data pages. In otherembodiments, the checksum in parity pages storing inter-device recoverydata 1250 may be calculated so that the checksum of the data pagechecksums is the same as the checksum of the parity page covering thecorresponding data pages. In such embodiments, the header for a paritypage need not be smaller than the header for a data page.

The inter-device ECC data 1250 may be parity information generated fromone or more pages on other storage devices holding user data. Forexample, the inter-device ECC data 1250 may be parity information usedin a RAID data layout architecture. Although the stored information isshown as contiguous logical pages in the storage devices 176 a-176 k, itis well known in the art the logical pages may be arranged in a randomorder, wherein each of the storage devices 176 a-176 k is an SSD.

The intra-device ECC data 1240 may include information used by anintra-device redundancy scheme. An intra-device redundancy schemeutilizes ECC information, such as parity information, within a givenstorage device. This intra-device redundancy scheme and its ECCinformation corresponds to a given device and may be maintained within agiven device, but is distinct from ECC that may be internally generatedand maintained by the device itself. Generally speaking, the internallygenerated and maintained ECC of the device is invisible to the systemwithin which the device is included.

The intra-device ECC data 1240 may also be referred to as intra-deviceerror recovery data 1240. The intra-device error recovery data 1240 maybe used to protect a given storage device from latent sector errors(LSEs). An LSE is an error that is undetected until the given sector isaccessed. Therefore, any data previously stored in the given sector maybe lost. A single LSE may lead to data loss when encountered during RAIDreconstruction after a storage device failure. The term “sector”typically refers to a basic unit of storage on a HDD, such as a segmentwithin a given track on the disk. Here, the term “sector” may also referto a basic unit of allocation on a SSD. Latent sector errors (LSEs)occur when a given sector or other storage unit within a storage deviceis inaccessible. A read or write operation may not be able to completefor the given sector. In addition, there may be an uncorrectableerror-correction code (ECC) error.

The intra-device error recovery data 1240 included within a givenstorage device may be used to increase data storage reliability withinthe given storage device. The intra-device error recovery data 1240 isin addition to other ECC information that may be included within anotherstorage device, such as parity information utilized in a RAID datalayout architecture.

Within each storage device, the intra-device error recovery data 1240may be stored in one or more pages. As is well known by those skilled inthe art, the intra-device error recovery data 1240 may be obtained byperforming a function on chosen bits of information within the user data1230. An XOR-based operation may be used to derive parity information tostore in the intra-device error recovery data 1240. Other examples ofintra-device redundancy schemes include single parity check (SPC),maximum distance separable (MDS) erasure codes, interleaved parity checkcodes (IPC), hybrid SPC and MDS code (MDS+SPC), and column diagonalparity (CDP). The schemes vary in terms of delivered reliability andoverhead depending on the manner the data 1240 is computed.

In addition to the above described error recovery information, thesystem may be configured to calculate a checksum value for a region onthe device. For example, a checksum may be calculated when informationis written to the device. This checksum is stored by the system. Whenthe information is read back from the device, the system may calculatethe checksum again and compare it to the value that was storedoriginally. If the two checksums differ, the information was not readproperly, and the system may use other schemes to recover the data.Examples of checksum functions include cyclical redundancy check (CRC),MD5, and SHA-1.

An erase block within an SSD may comprise several pages. A page mayinclude 4KB of data storage space. An erase block may include 64 pages,or 256KB. In other embodiments, an erase block may be as large as 1megabyte (MB), and include 256 pages. An allocation unit size may bechosen in a manner to provide both sufficiently large sized units and arelatively low number of units to reduce overhead tracking of theallocation units. In one embodiment, one or more state tables maymaintain a state of an allocation unit (allocated, free, erased, error),a wear level, and a count of a number of errors (correctable and/oruncorrectable) that have occurred within the allocation unit. In oneembodiment, an allocation unit is relatively small compared to the totalstorage capacity of an SSD. Other amounts of data storage space forpages, erase blocks and other unit arrangements are possible andcontemplated.

The metadata 1260 may include page header information, RAID stripeidentification information, log data for one or more RAID stripes, andso forth. In various embodiments, the single metadata page at thebeginning of each stripe may be rebuilt from the other stripe headers.Alternatively, this page could be at a different offset in the parityshard so the data can be protected by the inter-device parity. In oneembodiment, the metadata 1260 may store or be associated with particularflag values that indicate this data is not to be deduplicated.

In addition to inter-device parity protection and intra-device parityprotection, each of the pages in storage devices 176 a-176 k maycomprise additional protection such as a checksum stored within eachgiven page. The checksum (8 byte, 4 byte, or otherwise) may be placedinside a page after a header and before the corresponding data, whichmay be compressed. For yet another level of protection, data locationinformation may be included in a checksum value. The data in each of thepages may include this information. This information may include both avirtual address and a physical address. Sector numbers, data chunk andoffset numbers, track numbers, plane numbers, and so forth may beincluded in this information as well. This mapping information may alsobe used to rebuild the address translation mapping table if the contentof the table is lost.

In one embodiment, each of the pages in the storage devices 176 a-176 kstores a particular type of data, such as the data types 1230-1260.Alternatively, pages may store more than one type of data. The pageheader may store information identifying the data type for acorresponding page. In one embodiment, an intra-device redundancy schemedivides a device into groups of locations for storage of user data. Forexample, a division may be a group of locations within a device thatcorrespond to a stripe within a RAID layout. In the example shown, onlytwo stripes, 1270 a and 1270 b, are shown for ease of illustration.

In one embodiment, a RAID engine within the storage controller 174 maydetermine a level of protection to use for storage devices 176 a-176 k.For example, a RAID engine may determine to utilize RAID double parityfor the storage devices 176 a-176 k. The inter-device redundancy data1250 may represent the RAID double parity values generated fromcorresponding user data. In one embodiment, storage devices 176 j and176 k may store the double parity information. It is understood otherlevels of RAID parity protection are possible and contemplated. Inaddition, in other embodiments, the storage of the double parityinformation may rotate between the storage devices rather than be storedwithin storage devices 176 j and 176 k for each RAID stripe. The storageof the double parity information is shown to be stored in storagedevices 176 j and 176 k for ease of illustration and description.Although each of the storage devices 176 a-176 k comprises multiplepages, only page 1212 and page 1220 are labeled for ease ofillustration.

It is noted that the above-described embodiments may comprise software.In such an embodiment, the program instructions that implement themethods and/or mechanisms may be conveyed or stored on a computerreadable medium. Numerous types of media which are configured to storeprogram instructions are available and include hard disks, floppy disks,CD-ROM, DVD, flash memory, Programmable ROMs (PROM), random accessmemory (RAM), and various other forms of volatile or non-volatilestorage.

In various embodiments, one or more portions of the methods andmechanisms described herein may form part of a cloud-computingenvironment. In such embodiments, resources may be provided over theInternet as services according to one or more various models. Suchmodels may include Infrastructure as a Service (IaaS), Platform as aService (PaaS), and Software as a Service (SaaS). In IaaS, computerinfrastructure is delivered as a service. In such a case, the computingequipment is generally owned and operated by the service provider. Inthe PaaS model, software tools and underlying equipment used bydevelopers to develop software solutions may be provided as a serviceand hosted by the service provider. SaaS typically includes a serviceprovider licensing software as a service on demand. The service providermay host the software, or may deploy the software to a customer for agiven period of time. Numerous combinations of the above models arepossible and are contemplated.

Although the embodiments above have been described in considerabledetail, numerous variations and modifications will become apparent tothose skilled in the art once the above disclosure is fully appreciated.It is intended that the following claims be interpreted to embrace allsuch variations and modifications.

What is claimed is:
 1. A computing system comprising: a data storagemedium; a data storage controller coupled to the data storage medium,the controller configured to: identify a query value corresponding to aread request; select, in dependence upon the query value, from aplurality of levels within a mapping table, the youngest levelassociated with the query value; and search the selected youngest levelfor an entry that maps the query value to a value corresponding to alocation within the data storage medium.
 2. The system as recited inclaim 1, further comprising a plurality of processes; wherein eachmapping table entry comprising a tuple including a tuple key value thatmay be used to identify data stored within the system; and wherein onlya first process of the processes is permitted to modify datacorresponding to a first subset of the tuple key values, and only asecond process of the processes is permitted to modify datacorresponding to a second subset of the key values, wherein the secondsubset does not overlap the first subset; wherein levels which are olderthan a given time may be accessed by multiple processes of the processeswithout requiring synchronization between the multiple processes.
 3. Thesystem as recited in claim 2, wherein the mapping table includes a thirdsubset of the tuple key values different from the first subset and thesecond subset, wherein a process is not assigned to manage modificationsof the third subset of the tuple key values until an update to datacorresponding to the third subset is performed.
 4. The system as recitedin claim 3, wherein prior to a process being assigned to managemodifications of data corresponding to the third subset, any process ofthe processes may service a read access to the data corresponding to thethird subset.
 5. The system as recited in claim 2, wherein two or moreprocesses of the plurality of processes may service queries for a givenkey to multiple levels of the plurality of levels simultaneously.
 6. Thesystem as recited in claim 5, wherein a result corresponding to a mostrecent level of the plurality of levels provided by the two or moreprocesses is selected as the final result.
 7. The system as recited inclaim 5, wherein the given key corresponds to a subset managed by aparticular process and levels in memory are queried by the particularprocess, and wherein levels which may be cached by other processes maybe queried by those other processes.
 8. The system as recited in claim1, wherein levels of the plurality of levels other than the newest levelare read only.
 9. A method for use in a storage system, the methodcomprising: identifying a query value corresponding to a read request;selecting, in dependence upon the query value, from a plurality oflevels within a mapping table, the youngest level associated with thequery value; and searching the selected youngest level for an entry thatmaps the query value to a value corresponding to a location within thedata storage medium.
 10. The method as recited in claim 9, furthercomprising executing a plurality of processes in the system; whereineach mapping table entry comprising a tuple including a tuple key valuethat may be used to identify data stored within the system; and whereinonly a first process of the processes is permitted to modify datacorresponding to a first subset of the tuple key values, and only asecond process of the processes is permitted to modify datacorresponding to a second subset of the key values, wherein the secondsubset does not overlap the first subset; the method further comprisingpermitting multiple processes of the processes to access levels whichare older than a given time without requiring synchronization betweenthe multiple processes.
 11. The method as recited in claim 10, whereinthe mapping table includes a third subset of the tuple key valuesdifferent from the first subset and the second subset, and wherein aprocess is not assigned to manage modifications of the third subset ofthe tuple key values until an update to data corresponding to the thirdsubset is performed.
 12. The method as recited in claim 11, furthercomprising permitting any process of the processes to service a readaccess to the data corresponding to the third subset prior to a processbeing assigned to manage modifications of data corresponding to thethird subset.
 13. The method as recited in claim 10, further comprisingpermitting two or more processes of the plurality of processes toservice queries for a given key to multiple levels of the plurality oflevels simultaneously.
 14. The method as recited in claim 13, furthercomprising selecting as a final result of two or more processesservicing queries for the given key, a result corresponding to a mostrecent level of the plurality of levels provided by the two or moreprocesses.
 15. The method as recited in claim 13, wherein the given keycorresponds to a subset managed by a particular process and levels inmemory are queried by the particular process, and wherein levels whichmay be cached by other processes may be queried by those otherprocesses.
 16. The method as recited in claim 9, wherein levels of theplurality of levels other than the newest level are read only.
 17. Anon-transitory computer readable storage medium storing programinstruction executable by a processor to: identify a query valuecorresponding to a read request; select, in dependence upon the queryvalue, from a plurality of levels within a mapping table, the youngestlevel associated with the query value; and search the selected youngestlevel for an entry that maps the query value to a value corresponding toa location within the data storage medium.
 18. The storage medium asrecited in claim 17, further comprising executing a plurality ofprocesses in the system; wherein each mapping table entry comprises atuple including a tuple key value that may be used to identify datastored within the system; and wherein only a first process of theprocesses is permitted to modify data corresponding to a first subset ofthe tuple key values, and only a second process of the processes ispermitted to modify data corresponding to a second subset of the keyvalues, wherein the second subset does not overlap the first subset;wherein the program instructions are further executable to causemultiple processes of the processes to access levels of the time orderedlevels which are older than a given time without requiringsynchronization between the multiple processes.
 19. The storage mediumas recited in claim 18, wherein the mapping table includes a thirdsubset of the tuple key values different from the first subset and thesecond subset, and wherein the program instructions are executable tonot assign a process to manage modifications of the third subset of thetuple key values until an update to data corresponding to the thirdsubset is performed.
 20. The storage medium as recited in claim 19,wherein the program instructions are further executable to allow anyprocess of the processes to service a read access to the datacorresponding to the third subset prior to a process being assigned tomanage modifications of data corresponding to the third subset.